package TextDemo1;

import javax.imageio.stream.FileImageOutputStream;
import java.io.*;

public class test02 {
    public static void main(String[] args) throws IOException {
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("b.txt"),"GBK");
        //写出数据
        osw.write("你好，你好");
        osw.close();

        FileWriter fw = new FileWriter("b.txt");
    }
}
